package com.asman.vr.network

/**
 * 非列表接口返回数据包装类
 */
data class ResourceNull(
    val status: Status,
    val code: String = "",
    val message: String = "",
    val datetime: String = "0"
) {
    companion object {
        fun success(datetime: String = "0"): ResourceNull =
            ResourceNull(Status.SUCCESS, datetime = datetime)

        fun error(code: String = "", msg: String): ResourceNull =
            ResourceNull(Status.ERROR, code, msg)

        fun loading(): ResourceNull? = ResourceNull(Status.LOADING)

    }
}
